package testcase;

import static org.testng.Assert.assertEquals;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import base.BaseDriver;
import pages.LogPage;
import pages.LoginPage;
import pages.MainPage;
import pages.PersonPage;

public class LogPageTest extends BaseDriver{
	PersonPage person_page;
	MainPage main_page;
	LoginPage login_page;
	LogPage log_page;
	@BeforeMethod
	public void init() throws InterruptedException {
		login_page=new LoginPage(driver);
		main_page=login_page.loginSuccess("panglimei","123456");
		person_page=main_page.clickPersonalInformationSuccess();
		log_page=person_page.clickExerciseLogSuccess();
	}
	
	@Test
	public void testClickExerciseGoalSuccess() throws InterruptedException {
		log_page.clickExerciseGoalSuccess();
		assertEquals(driver.currentActivity(),".Activity.GoalActivity");
	}
	
	@Test
	public void testClickExerciseResultSuccess() throws InterruptedException {
		log_page.clickExerciseResultSuccess();
		assertEquals(driver.currentActivity(),".Activity.ResultActivity");
	}
	
}
